const Mock = require('mockjs')
const fs = require('fs')
const data = Mock.mock({
  "list|100": [{
    "image": "@image(150x120, @color, img)",
    "title": '@ctitle',
    "count|10-1000000": 1,
    "address": "@city",
    "type|1": ["即将开课",  "开课中", '已结课']
  }],
  "tab|5": [{
    "title|+1": ['一流数据', '研究生课程','职业教育','计算机', '经济管理'],
    "children|10-20": [{
      "image": "@image(150x120, @color, img)",
      "title": '@ctitle',
      "count|10-1000000": 1,
      "address": "@city"
    }]
  }],
  "hotList": {
    "name": '热门直播',
    "list|3": [{
      "image": "@image(150x120, @color, img)",
      "title": '@ctitle',
      "count|10-1000000": 1
    }]
  },
  "swiperList|5": ["@image(120x80, @color, image)"],
  "menuList": [{
    url: '@image(50x50, @color, image)',
    name: '一流课程'
  }, {
    url: '@image(50x50, @color, image)',
    name: '一流课程'
  }, {
    url: '@image(50x50, @color, image)',
    name: '一流课程'
  }, {
    url: '@image(50x50, @color, image)',
    name: '一流课程'
  }, {
    url: '@image(50x50, @color, image)',
    name: '一流课程'
  }, {
    url: '@image(50x50, @color, image)',
    name: '一流课程'
  }, {
    url: '@image(50x50, @color, image)',
    name: '一流课程'
  }, {
    url: '@image(50x50, @color, image)',
    name: '一流课程'
  }, {
    url: '@image(50x50, @color, image)',
    name: '一流课程'
  }, {
    url: '@image(50x50, @color, image)',
    name: '更多'
  }]
})


fs.writeFileSync('data.json', JSON.stringify(data));